package cn.pxs.mapper;


import cn.pxs.entity.ItemBook;
import cn.pxs.entity.OrdInfo;
import cn.pxs.entity.Order;
import cn.pxs.entity.OrderLine;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;
import java.util.Map;

public interface OrdMapper {
    ///api/fore/ord
    //ordid查询
    List<ItemBook> findItemInfoByOrdid(@Param("ordid")Integer ordid);
    //更新发货地址及电话
    void updateAddr(@Param("order") Order order);
    //更新付款标识
    void updatePay(@Param("order") Order order);
    //根据ordid 查询 Order
    Order findOrderByOrdid(@Param("ordid")Integer ordid);
    //查找该登录用户的所有订单头信息
    List<OrderLine> findOrdLines(@Param("user")Object user,
                                 @Param("orderLine")OrderLine orderLine,
                                 @Param("tstart")String tstart,
                                 @Param("tend")String tend);
    //查找该登录用户的所有订单头信息
    List<OrderLine> findOrdLineByPage(@Param("user")Object user,
                                      @Param("orderLine")OrderLine orderLine,
                                      @Param("map") Map map);
    //查找该登录用户的所有订单头信息  的行数
    int findOrdLineByPageLine(@Param("user")Object user,@Param("orderLine")OrderLine orderLine,@Param("map") Map map);
    OrdInfo findInfoByOrdid(@Param("user")Object user,
                            @Param("ordid")Integer ordid);
    void addOrd(@Param("user")Object user,
                @Param("order")Order order);


    ///api/adm/ord/
    //addShip
    void updateShip(Order order);
    ///findOrdInfo
    List<OrderLine> findOrdInfo(@Param("start")Integer start,
             @Param("num")Integer num,@Param("orderLine") OrderLine orderLine,
                                @Param("map")Map map);
    //findOrdInfo的行数
    int findOrdInfoLine(@Param("orderLine")OrderLine orderLine,@Param("map")Map map);



}
